package spring.schedule;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.scheduling.quartz.QuartzJobBean;

/**
 * 应为要持久化等特性操作,需要继承 QuartzJobBean
 * 由于要被持久化,所以不能存放xxxxManager类似对象,
 * 只能从每次从QuartzJobBean注入的ApplicationContext 中去取出
 * 继承QuartzJobBean，实现方法executeInternal
 * @author liyl
 *
 */
public class ReleaseQtyAndUpdateOrderStatusSchedule extends QuartzJobBean {

	@Override
	protected void executeInternal(JobExecutionContext arg0) throws JobExecutionException {
		 try {
		     System.out.println("我要开始执行了........");
		    } catch (Exception e) {
		      e.printStackTrace();
		      System.out.println("execute ReleaseQtyAndUpdateOrderStatus schedule error:"
		          + e.getMessage());
		    }
		 	System.out.println("执行结束...........");
		  }

}
